# -*- coding:utf-8 -*-
import pytest
import subprocess

if __name__ == '__main__':
    pytest.main(['-s', '-v', '--alluredir', "reports/json/", "test_case/demo"])

    cmd="allure generate reports/json/ -o reports/html --clean"
    subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()

    cmd="allure serve reports/json"
    subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()